Skip to content

Conversation

@SpencerMalone
Copy link
Contributor

Overview

This is a style cleanup and analysis sweep of the templates to try and get them matching the code quality elsewhere.

What this PR does / why we need it

  1. I ran php-cs-fixer a bunch on the generated templates, but sadly couldn't get that into CI because it desperately wanted to fix the class names to be short instead of the FQDN. I figure we can do this later
  2. I ran phpstan on the templates and fixed a bunch of minor things with that
  3. I tried to setup CI to run phpstan on the templates, I'm not fullyyyyy sure I set all that up right, I'm relatively unfamiliar with dagger but hopefully I figured it out?

Special notes for your reviewer

Does this PR introduce a user-facing change?

Cleanup up code style and typing throughout generated code.

@SpencerMalone SpencerMalone force-pushed the phpstan-on-templates branch 3 times, most recently from 6f25d66 to 14655c5 Compare January 9, 2026 02:08
@SpencerMalone
Copy link
Contributor Author

Here's an execution where I made a failing change to a template: https://github.com/twirphp/twirp/actions/runs/20838658367/job/59868408300?pr=236

Here's an execution with lib/ failing: https://github.com/twirphp/twirp/actions/runs/20838717364/job/59868568606?pr=236

@SpencerMalone SpencerMalone marked this pull request as ready for review January 9, 2026 02:09
@SpencerMalone
Copy link
Contributor Author

Also lemme know if this is too large, I just sort of went down the list of reported issues on this one

Copy link
Member

@sagikazarmark sagikazarmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I had a couple comments.

@sagikazarmark
Copy link
Member

Thanks @SpencerMalone !

@sagikazarmark sagikazarmark merged commit d1b42ec into twirphp:master Jan 14, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants